package com.zpp.utils;


import java.util.Objects;

public class User {

  public String hobby;
  protected String birth;
  String address;
  private String name;
  private short age;

  public User() {
  }

  private User(String hobby) {
  }

  public User(String hobby, String birth, String address, String name, short age) {
    this.hobby = hobby;
    this.birth = birth;
    this.address = address;
    this.name = name;
    this.age = age;
  }

  private String getNewName() {
    return "";
  }

  @Override
  public boolean equals(Object o) {
    if (this == o) return true;
    if (o == null || getClass() != o.getClass()) return false;
    User user = (User) o;
    return age == user.age && Objects.equals(hobby, user.hobby) && Objects.equals(birth, user.birth) && Objects.equals(address, user.address) && Objects.equals(name, user.name);
  }

  @Override
  public int hashCode() {
    return Objects.hash(hobby, birth, address, name, age);
  }

  @Override
  public String toString() {
    return "User{" +
      "hobby='" + hobby + '\'' +
      ", birth='" + birth + '\'' +
      ", address='" + address + '\'' +
      ", name='" + name + '\'' +
      ", age=" + age +
      '}';
  }

  public String getHobby() {
    return hobby;
  }

  public void setHobby(String hobby) {
    this.hobby = hobby;
  }

  public String getBirth() {
    return birth;
  }

  public void setBirth(String birth) {
    this.birth = birth;
  }

  public String getAddress() {
    return address;
  }

  public void setAddress(String address) {
    this.address = address;
  }

  public String getName() {
    return name;
  }

  public void setName(String name) {
    this.name = name;
  }

  public short getAge() {
    return age;
  }

  public void setAge(short age) {
    this.age = age;
  }
}
